home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / dev / lang / Python152_Src.lha / Python152_Source / Amiga / fibex.h < prev    next >
C/C++ Source or Header  |  1994-09-30  |  3KB  |  77 lines

  1. /*
  2.  *      $Id: fibex.h,v 4.1 1994/09/29 23:09:02 jraja Exp $
  3.  *
  4.  *      fibex.h - extensions to FIB (File Information Block)
  5.  *
  6.  *      Copyright © 1994 AmiTCP/IP Group, 
  7.  *                       Network Solutions Development Inc.
  8.  *                       All rights reserved.
  9.  */
  10.  
  11. #include <dos/dosextens.h>
  12.  
  13. /*
  14.  * This is already in 3.0 includes
  15.  */
  16. #ifndef FIBB_OTR_READ
  17. #define FileInfoBlock myFileInfoBlock
  18.  
  19. /* Returned by Examine() and ExNext(), must be on a LONG boundary */
  20. struct FileInfoBlock {
  21.    LONG      fib_DiskKey;
  22.    LONG      fib_DirEntryType;
  23.    char      fib_FileName[108]; 
  24.    LONG      fib_Protection;    
  25.    LONG      fib_EntryType;
  26.    LONG      fib_Size;         
  27.    LONG      fib_NumBlocks;     
  28.    struct DateStamp fib_Date;
  29.    char      fib_Comment[80];   
  30.    /* Note: the following fields are not supported by all filesystems.    */
  31.    /* They should be initialized to 0 sending an ACTION_EXAMINE packet.    */
  32.    /* When Examine() is called, these are set to 0 for you.        */
  33.    /* AllocDosObject() also initializes them to 0.            */
  34.    UWORD  fib_OwnerUID;        /* owner's UID */
  35.    UWORD  fib_OwnerGID;        /* owner's GID */
  36.    char      fib_Reserved[32];
  37. }; /* FileInfoBlock */
  38.  
  39. /* FIB stands for FileInfoBlock */
  40.  
  41. /* FIBB are bit definitions, FIBF are field definitions */
  42. /* Regular RWED bits are 0 == allowed. */
  43. /* NOTE: GRP and OTR RWED permissions are 0 == not allowed! */
  44. /* Group and Other permissions are not directly handled by the filesystem */
  45. #define FIBB_OTR_READ       15    /* Other: file is readable */
  46. #define FIBB_OTR_WRITE       14    /* Other: file is writable */
  47. #define FIBB_OTR_EXECUTE   13    /* Other: file is executable */
  48. #define FIBB_OTR_DELETE    12    /* Other: prevent file from being deleted */
  49. #define FIBB_GRP_READ       11    /* Group: file is readable */
  50. #define FIBB_GRP_WRITE       10    /* Group: file is writable */
  51. #define FIBB_GRP_EXECUTE   9    /* Group: file is executable */
  52. #define FIBB_GRP_DELETE    8    /* Group: prevent file from being deleted */
  53.  
  54. #define FIBF_OTR_READ       (1<<FIBB_OTR_READ)
  55. #define FIBF_OTR_WRITE       (1<<FIBB_OTR_WRITE)
  56. #define FIBF_OTR_EXECUTE   (1<<FIBB_OTR_EXECUTE)
  57. #define FIBF_OTR_DELETE    (1<<FIBB_OTR_DELETE)
  58. #define FIBF_GRP_READ       (1<<FIBB_GRP_READ)
  59. #define FIBF_GRP_WRITE       (1<<FIBB_GRP_WRITE)
  60. #define FIBF_GRP_EXECUTE   (1<<FIBB_GRP_EXECUTE)
  61. #define FIBF_GRP_DELETE    (1<<FIBB_GRP_DELETE)
  62.  
  63. #endif /* defined(FIBB_OTR_READ) */
  64.  
  65. /*
  66.  * These are probably defined only for MuFS
  67.  */
  68. #define FIBB_SUID 31
  69. #define FIBB_SGID 30        /* in MuFS 2, perhaps? */
  70.  
  71. #define FIBF_SUID (1<<FIBB_SUID)
  72. #define FIBF_SGID (1<<FIBB_SGID)
  73.  
  74. void __dostat(struct FileInfoBlock *fib, struct stat *st);
  75. extern struct FileInfoBlock __dostat_fib[];
  76.  
  77.